package com.xinqi.common.core.enums;

/**
 * 助手通知类型
 */
public enum AssistantMessageTypeEnum {

    // 助手通知类型
    COURSEWARE("courseware", 1, "互动课件"),
    DATA("resource", 2, "资料"),
    HOMEWORK("task", 3, "作业"),
    EXAM("test", 4, "测评"),
    DISCUSS("notice", 5, "讨论"),
    INTERACTIVE_VIDEO("video", 6, "互动视频"),
    NOTICE("topic", 8, "公告"),
    INTERACTION("interaction", 9, "课堂互动"),
    ATTENDANCE("attendance", 10, "考勤");

    private String code;
    private Integer type;
    private String description;

    AssistantMessageTypeEnum(String code, Integer type, String description) {
        this.code = code;
        this.type = type;
        this.description = description;
    }

    public String getCode() {
        return code;
    }

    public Integer getType() {
        return type;
    }

    public String getDescription() {
        return description;
    }

    public static AssistantMessageTypeEnum getAssistantMessageType(Integer type) {
        for (AssistantMessageTypeEnum assistantMessageType : values()) {
            if (assistantMessageType.getType().equals(type)) {
                //获取指定的枚举
                return assistantMessageType;
            }
        }
        return null;
    }

}
